{% extends "bootstrap/base.html" %}

{%block title%}
马克笔记 - 与世界分享知识与智慧
{%endblock title%}
{%block metas%}
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="author" content="yizweb.com">
<meta name="applicable-device"content="pc,mobile">
<meta name="format-detection" content="telephone=no">
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=yes">
<link rel="shortcut icon" href="/static/favicon.ico" mce_href="/static/favicon.ico" type="image/x-icon">
{%endblock metas%}

{%block styles%}
<script>if((typeof window.JSON)==='undefined'){ document.write('<script src="/static/dist/js/json2.js"><\/script>');}</script>

<!--[if lt IE 9]>
<link rel="stylesheet" href="{{url_for("static", filename="dist/js/respond.js")}}">
<link rel="stylesheet" href="{{url_for("static", filename="dist/js/html5shiv.js")}}">
<![endif]-->

{%endblock styles%}
{%block navbar%}

{%if not current_user.is_authenticated %}
<header class="header header-top">
    <div class="container">
        <a class="logo" href="{{url_for("home.index")}}">
            <img src="{{url_for("static", filename="img/logo.jpg")}}" alt="马克笔记">
        </a>

        <a href="javascript:" class="menu-btn">
            <span class="span-line line-1"></span>
            <span class="span-line line-2"></span>
            <span class="span-line line-3"></span>
        </a>
        <div class="menu-navbar">
            <div id="search-form-header" class="search-form-header">
                <form action="{{url_for("home.search")}}">
                    <input id="header-search" class="form-control search-input-header" type="text" aria-label="搜索"  name="keyword" autocomplete="off" placeholder="搜索马克笔记">
                    <span class="input-icon-right">
                        <button type="submit" class="fa fa-search"></button>
                    </span>
                </form>
            </div>
            <nav class="pull-right">
                <ul class="nav header-nav header-main-nav">
                    <li><a href="{{url_for("article.index")}}">文章</a></li>
                    <li><a href="{{url_for("home.topic")}}">专题</a></li>
                </ul>
                 <ul class="header-btn-group">
                    <li><a href="{{url_for("article.new")}}" class="btn-new btn-new-article">文章</a></li>
                </ul>
 
 
                <ul class="nav header-nav header-font-nav">
                    {%if request.endpoint=="home.login"%}
                    <li><a href="{{url_for("home.register")}}">注册</a></li>
                    {%elif request.endpoint=="home.register"%}
                    <li><a href="{{url_for("home.login")}}">登录</a></li>
                    {%else%}
                    <li><a href="{{url_for("home.login")}}">登录</a></li>
                    <li><a href="{{url_for("home.register")}}">注册</a></li>
                    {%endif%}
                </ul>
 
            </nav>
        </div>
    </div>
</header>
{%else%}
<header class="header header-top">
    <div class="container">
        <a class="logo" href="{{url_for("home.index")}}">
            <img src="{{url_for("static", filename="img/logo.jpg")}}" alt="马克笔记">
        </a>
        <div id="search-form-header" class="search-form-header">
            <form action="{{url_for("home.search")}}">
                <input id="header-search" class="form-control search-input-header" type="text" aria-label="搜索"  name="keyword" autocomplete="off" placeholder="搜索马克笔记">
                <span class="input-icon-right">
                    <button type="submit" class="fa fa-search"></button>
                </span>
            </form>
        </div>
 
        <nav class="pull-right">
            <ul class="nav header-nav header-main-nav">
                <li><a href="{{url_for("article.index")}}">文章</a></li>
                <li><a href="{{url_for("home.topic")}}">专题</a></li>
            </ul>
 
            <ul class="nav header-nav">
                <li><a href="{{url_for("home.index")}}"><i class="fa fa-home"></i> 首页</a></li>
                <li><a href="{{url_for("user.index", id=current_user.id)}}"><i class="fa fa-user"></i> {{current_user.username}}</a></li>
            </ul>
            <span class="header-split"></span>
            <ul class="nav header-nav">
                <li>
                    <a href="javascript:void(0);" data-toggle="dropdown"><i class="fa fa-gear"></i></a>
                    <ul class="dropdown-menu message-dropdown dropdown-sw">
                        <li><a href="{{url_for("user.index", id=current_user.id)}}">个人中心</a></li>
                        <li><a href="{{url_for("setting.basic")}}">设置</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="{{url_for("home.logout")}}">退出</a></li>
                    </ul>
                </li>
            </ul>
            <ul class="header-btn-group">
                <li><a href="{{url_for("article.new")}}" class="btn-new btn-new-article">文章</a></li>
            </ul>
        </nav>
    </div>
</header>
{%endif%}
{%endblock navbar%}

{%block content%}
{%endblock content%}

{%block scripts%}

{%endblock scripts%}
